<script>
/**
    1.两个嵌套循环
    2.时间复杂度：O(n^2) 性能不大行
*/
    let arr = [19,3,9,90,1,32,20]
    Array.prototype.bubble = function () {
        for(let i = 0; i < this.length-1; i++){
            for(let j = 0; j < this.length-1-i; j++){
                if(this[j+1]<this[j]){
                    const temp = this[j]
                    this[j] = this[j+1]
                    this[j+1] = temp
                }
            }
        }
    }
    arr.bubble()
   console.log(arr);
</script>